<?php
header('Content-Type: application/json');
Header('Access-Control-Allow-Methods:GET,POST,PUT,DELETE');
header("Access-Control-Allow-Headers: Content-Type");
header('Access-Control-Allow-Origin:*');   //跨域

if($_SERVER['REQUEST_METHOD'] === 'GET'){
    $imglist=array(
        '/uploads/bishe1.jpg',
        '/uploads/bishe2.png',
        '/uploads/bishe3.png',
        '/uploads/bishe4.png'
    );
    $response = [
        'status' => 1,
        'message' => 'ok',
        'imglist'=>$imglist
    ];
    // 将响应数据以 JSON 格式返回给前端
    echo json_encode($response);
}else{
    // 返回上传失败的信息
    $response = [
        'status' => 0,
        'message' => '不是get请求'
    ];
    echo json_encode($response);
}


?>
